package com.platform.module.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.annotation.Excel;
import com.platform.common.annotation.Excels;
import com.platform.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 热量表设备数据对象 base_calorimeter_data
 * 
 * @author xuwei
 * @date 2020-07-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("base_calorimeter_data")
public class BaseCalorimeterData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 热量表ID */
    @NotBlank(message = "热量表ID不能为空")
    @Excel(name = "热量表ID")
    @TableId(type = IdType.INPUT)

    private String calorimeterId;

    /** 型号id */
    @NotBlank(message = "型号id不能为空")
    private Long typeId;

    /** 安装时间 */
    @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date installTime;

    /** 安装地址 */
    @Excel(name = "安装地址")
    private String installAddress;

    /** 安装人 */
    @Excel(name = "安装人")
    private String installUser;

    /** 删除标识（0正常1删除） */
    @TableLogic
    private String delFlag;

    /** 热量表类型 */
    @Excels({
            @Excel(name = "热量表类型", targetAttr = "typeName", type = Excel.Type.EXPORT),
    })
    @TableField(exist = false)
    private BaseCalorimeterType calorimeterType;

    /** 厂商信息 */
    @Excels({
            @Excel(name = "厂商名称", targetAttr = "factoryName"),
            @Excel(name = "厂商代码", targetAttr = "factoryCode", type = Excel.Type.EXPORT)
    })
    @TableField(exist = false)
    private BaseFactory factory;

    @Excel(name = "热量表型号", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String typeName;

    /** 集中器id */
    @TableField(exist = false)
    @Excel(name = "集中器id", type = Excel.Type.IMPORT)
    private String concentratorId;

    /** 热表ids */
    @TableField(exist = false)
    private String calorimeterIds;

    /** 安装标识（0未登记1已登记2已注销) */
    @TableField(exist = false)
    private String status;

    @TableField(exist = false)
    private BaseSubscriber subscriber;
    /** 地址id */
    @TableField(exist = false)
    private String subscriberId;

    @TableField(exist = false)
    private Integer count;
}
